/*
package com.zhx.rmq.consumer.controller;

import com.zhx.rmq.utils.HttpClientUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

@Slf4j
@Component
@RabbitListener(queues = "directQueue")//监听的队列名称 directQueue
public class DirectReceiver {

    private static HttpClientUtil httpClient= HttpClientUtil.getInstance();
    */
/**
     * 多个消费者监听同一个直连交互的同一个队列
     * 就会变成轮询消费模式
     * 且不会重复消费
     * @param msg
     *//*


    @RabbitHandler
    public void process(Map msg) {
        log.info("消费者1收到消息ID: [{}]",msg.get("messageId"));

        HashMap<String, String> map = new HashMap<>();
        map.put("order_no",msg.get("order_no").toString());
        //订单退款
        String s = httpClient.sendGet("http://localhost:6301/applebackstage/order/refund",map);

        log.info("消费者1的处理结果: [{}]",s);
    }

}*/
